<!doctype html>
<html class="default no-js">
<head>
	<meta charset="utf-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
	<title>modules/dateToString | @iwowen/utils</title>
	<meta name="description" content="">
	<meta name="viewport" content="width=device-width, initial-scale=1">
	<link rel="stylesheet" href="../assets/css/main.css">
</head>
<body>
<header>
	<div class="tsd-page-toolbar">
		<div class="container">
			<div class="table-wrap">
				<div class="table-cell" id="tsd-search" data-index="../assets/js/search.json" data-base="..">
					<div class="field">
						<label for="tsd-search-field" class="tsd-widget search no-caption">Search</label>
						<input id="tsd-search-field" type="text" />
					</div>
					<ul class="results">
						<li class="state loading">Preparing search index...</li>
						<li class="state failure">The search index is not available</li>
					</ul>
					<ul class="results-priority" style="display:none">
					</ul>
					<a href="../index.html" class="title">@iwowen/utils</a>
				</div>
				<div class="table-cell" id="tsd-widgets">
					<div id="tsd-filter">
						<a href="#" class="tsd-widget options no-caption" data-toggle="options">Options</a>
						<div class="tsd-filter-group">
							<div class="tsd-select" id="tsd-filter-visibility">
								<span class="tsd-select-label">All</span>
								<ul class="tsd-select-list">
									<li data-value="public">Public</li>
									<li data-value="protected">Public/Protected</li>
									<li data-value="private" class="selected">All</li>
								</ul>
							</div>
							<input type="checkbox" id="tsd-filter-inherited" checked />
							<label class="tsd-widget" for="tsd-filter-inherited">Inherited</label>
							<input type="checkbox" id="tsd-filter-externals" checked />
							<label class="tsd-widget" for="tsd-filter-externals">Externals</label>
							<input type="checkbox" id="tsd-filter-only-exported" />
							<label class="tsd-widget" for="tsd-filter-only-exported">Only exported</label>
						</div>
					</div>
					<a href="#" class="tsd-widget menu no-caption" data-toggle="menu">Menu</a>
				</div>
			</div>
		</div>
	</div>
	<div class="tsd-page-title">
		<div class="container">
			<ul class="tsd-breadcrumb">
				<li>
					<a href="_modules_datetostring_.html">modules/dateToString</a>
				</li>
			</ul>
		</div>
	</div>
</header>
<div class="container container-main">
	<div class="row">
		<div class="col-3 col-menu menu-sticky-wrap menu-highlight">
			<nav class="tsd-navigation primary">
				<ul>
					<li class="globals  ">
						<a href="../globals.html"><em>Globals</em></a>
					</li>
					<li class="label tsd-is-external">
						<span>Internals</span>
					</li>
					<li class=" tsd-kind-module">
						<a href="_modules_clone_.html">modules/clone</a>
					</li>
					<li class=" tsd-kind-module">
						<a href="_modules_clonedeep_.html">modules/cloneDeep</a>
					</li>
					<li class="current tsd-kind-module">
						<a href="_modules_datetostring_.html">modules/dateToString</a>
					</li>
					<li class=" tsd-kind-module">
						<a href="_modules_debounce_.html">modules/debounce</a>
					</li>
					<li class=" tsd-kind-module">
						<a href="_modules_filterrichlabel_.html">modules/filterRichLabel</a>
					</li>
					<li class=" tsd-kind-module">
						<a href="_modules_isobject_.html">modules/isObject</a>
					</li>
					<li class=" tsd-kind-module">
						<a href="_modules_storage_.html">modules/storage</a>
					</li>
					<li class=" tsd-kind-module">
						<a href="_modules_throttle_.html">modules/throttle</a>
					</li>
					<li class="label tsd-is-external">
						<span>Externals</span>
					</li>
					<li class=" tsd-kind-module tsd-is-external">
						<a href="_types_index_.html">types/index</a>
					</li>
				</ul>
			</nav>
		</div>
		<div class="col-7 offset-3 col-content">
			<h1>Module modules/dateToString</h1>
			<section class="tsd-panel-group tsd-index-group">
				<section class="tsd-panel tsd-index-panel">
					<div class="tsd-index-content">
						<section class="tsd-index-section ">
							<h3>Functions</h3>
							<ul class="tsd-index-list">
								<li class="tsd-kind-function tsd-parent-kind-module"><a href="_modules_datetostring_.html#datetostring" class="tsd-kind-icon">dateToString</a></li>
								<li class="tsd-kind-function tsd-parent-kind-module"><a href="_modules_datetostring_.html#numbertostring" class="tsd-kind-icon">numberToString</a></li>
							</ul>
						</section>
					</div>
				</section>
			</section>
			<section class="tsd-panel-group tsd-member-group ">
				<h2>Functions</h2>
				<section class="tsd-panel tsd-member tsd-kind-function tsd-parent-kind-module">
					<a name="datetostring" class="tsd-anchor"></a>
					<h3><span class="tsd-flag ts-flagConst">Const</span> date<wbr>ToString</h3>
					<ul class="tsd-signatures tsd-kind-function tsd-parent-kind-module">
						<li class="tsd-signature tsd-kind-icon">date<wbr>ToString<span class="tsd-signature-symbol">(</span>d<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Date</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">number</span>, str<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span></li>
					</ul>
					<ul class="tsd-descriptions">
						<li class="tsd-description">
							<aside class="tsd-sources">
								<ul>
									<li>Defined in modules/dateToString.ts:6</li>
								</ul>
							</aside>
							<div class="tsd-comment tsd-typography tsd-comment-shorttext">
								<div class="lead">
									<p>格式化时间</p>
								</div>
							</div>
							<h4 class="tsd-parameters-title">Parameters</h4>
							<ul class="tsd-parameters">
								<li>
									<h5>d: <span class="tsd-signature-type">Date</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">number</span></h5>
									<div class="tsd-comment tsd-typography tsd-comment-shorttext">
										<div class="lead">
											<p>时间戳或者Date</p>
										</div>
									</div>
								</li>
								<li>
									<h5><span class="tsd-flag ts-flagDefault value">Default value</span> str: <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> = &quot;YYYY-MM-dd HH:mm:ss&quot;</span></h5>
									<div class="tsd-comment tsd-typography tsd-comment-shorttext">
										<div class="lead">
											<p>YYYY-MM-dd HH:mm:ss</p>
										</div>
									</div>
								</li>
							</ul>
							<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">string</span></h4>
						</li>
					</ul>
				</section>
				<section class="tsd-panel tsd-member tsd-kind-function tsd-parent-kind-module">
					<a name="numbertostring" class="tsd-anchor"></a>
					<h3>number<wbr>ToString</h3>
					<ul class="tsd-signatures tsd-kind-function tsd-parent-kind-module">
						<li class="tsd-signature tsd-kind-icon">number<wbr>ToString<span class="tsd-signature-symbol">(</span>num<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, len<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span></li>
					</ul>
					<ul class="tsd-descriptions">
						<li class="tsd-description">
							<aside class="tsd-sources">
								<ul>
									<li>Defined in modules/dateToString.ts:35</li>
								</ul>
							</aside>
							<div class="tsd-comment tsd-typography tsd-comment-shorttext">
								<div class="lead">
									<p>整数转为特定长度的字符串
										不足位补0，多余位去掉
										9 -&gt; &#39;09&#39;
									123 -&gt; &#39;23&#39;</p>
								</div>
							</div>
							<h4 class="tsd-parameters-title">Parameters</h4>
							<ul class="tsd-parameters">
								<li>
									<h5>num: <span class="tsd-signature-type">number</span></h5>
									<div class="tsd-comment tsd-typography tsd-comment-text">
										<p>数据</p>
									</div>
								</li>
								<li>
									<h5><span class="tsd-flag ts-flagDefault value">Default value</span> len: <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol"> = 2</span></h5>
									<div class="tsd-comment tsd-typography tsd-comment-text">
										<p>转换长度</p>
									</div>
								</li>
							</ul>
							<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">string</span></h4>
						</li>
					</ul>
				</section>
			</section>
			<!--{&quot;options&quot;:&quot;typedoc.json&quot;,&quot;tsconfig&quot;:&quot;/Users/yl/project/tutils&quot;,&quot;inputFiles&quot;:[&quot;./modules&quot;],&quot;mode&quot;:1,&quot;includeDeclarations&quot;:false,&quot;entryPoint&quot;:&quot;&quot;,&quot;exclude&quot;:[&quot;modules/index.ts&quot;],&quot;externalPattern&quot;:[],&quot;excludeExternals&quot;:false,&quot;excludeNotExported&quot;:false,&quot;excludeNotDocumented&quot;:false,&quot;excludePrivate&quot;:false,&quot;excludeProtected&quot;:false,&quot;ignoreCompilerErrors&quot;:false,&quot;disableSources&quot;:false,&quot;includes&quot;:&quot;&quot;,&quot;media&quot;:&quot;&quot;,&quot;out&quot;:&quot;docs&quot;,&quot;json&quot;:&quot;&quot;,&quot;theme&quot;:&quot;./node_modules/typedoc-neo-theme/bin/default&quot;,&quot;name&quot;:&quot;&quot;,&quot;includeVersion&quot;:false,&quot;excludeTags&quot;:[],&quot;readme&quot;:&quot;&quot;,&quot;defaultCategory&quot;:&quot;Other&quot;,&quot;categoryOrder&quot;:[],&quot;categorizeByGroup&quot;:true,&quot;gitRevision&quot;:&quot;&quot;,&quot;gitRemote&quot;:&quot;origin&quot;,&quot;gaID&quot;:&quot;&quot;,&quot;gaSite&quot;:&quot;auto&quot;,&quot;hideGenerator&quot;:false,&quot;toc&quot;:[],&quot;disableOutputCheck&quot;:false,&quot;help&quot;:false,&quot;version&quot;:false,&quot;plugin&quot;:[],&quot;logger&quot;:&quot;console&quot;,&quot;listInvalidSymbolLinks&quot;:false}-->
		</div>
		<div class="col-2 col-menu secondary-menu">
			<nav class="tsd-navigation secondary menu-sticky">
				<ul class="before-current">
					<li class=" tsd-kind-function tsd-parent-kind-module root">
						<a href="_modules_datetostring_.html#datetostring" class="tsd-kind-icon">date<wbr>ToString</a>
					</li>
					<li class=" tsd-kind-function tsd-parent-kind-module root">
						<a href="_modules_datetostring_.html#numbertostring" class="tsd-kind-icon">number<wbr>ToString</a>
					</li>
				</ul>
			</nav>
		</div>
	</div>
</div>
<footer class="with-border-bottom">
</footer>
<div class="container tsd-generator">
	<p>Generated using <a href="http://typedoc.org/" target="_blank">TypeDoc</a></p>
</div>
<div class="overlay"></div>
<script src="../assets/js/main.js"></script>
</body>
</html>